home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / C⁄C++ / picture / dycube.h < prev    next >
Text File  |  1993-09-23  |  1KB  |  48 lines

  1. //    Copyright 1993 Ralph Gonzalez
  2.  
  3. /*
  4. *    FILE:        dycube.h
  5. *    AUTHOR:        R. Gonzalez
  6. *    CREATED:    October 6, 1990
  7. *
  8. *    Defines dynamic cube for picture application.
  9. */
  10.  
  11. # ifndef    dycube_h
  12. # define    dycube_h
  13.  
  14. # include    "dynamic.h"
  15. # include    "color.h"
  16.  
  17. /******************************************************************
  18. *   Dynamic cube.
  19. ******************************************************************/
  20. class    Dynamic_Cube:public Dynamic_Segment
  21. {
  22. public:
  23.     Dynamic_Cube(void);
  24. //    not implemented:
  25. //    virtual void    set(...);
  26. };
  27.  
  28. /******************************************************************
  29. *   fast cube.  No nested segments.  Faster because you only
  30. *    calculate perspective projection for each line endpoint once.
  31. ******************************************************************/
  32. class    Fast_Dynamic_Cube:public Dynamic_Segment
  33. {
  34. private:
  35.     Coord3            *c[8];
  36.     color            cube_color;
  37.  
  38. public:
  39.     Fast_Dynamic_Cube(void);
  40. //    not implemented:
  41. //    virtual void    set(...);
  42.     virtual void    set_color(color);
  43.     virtual void    draw(Camera*,Projector*,Transformation*);
  44.     virtual void    move(Transformation*);
  45.     virtual            ~Fast_Dynamic_Cube(void);
  46. };
  47.  
  48. # endif